<!DOCTYPE html>
<!--[if IE]><![endif]-->
<!--[if IE 8 ]><html dir="ltr" lang="zh-CN" class="ie8"><![endif]-->
<!--[if IE 9 ]><html dir="ltr" lang="zh-CN" class="ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html dir="ltr" lang="zh-CN">
<!--<![endif]-->
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<base href="http://localhost/" />
<script src="catalog/view/theme/gd-free/javascript/jquery-1.11.3.min.js" type="text/javascript"></script>
<link href="catalog/view/javascript/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen" />
<script src="catalog/view/javascript/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<link href="catalog/view/javascript/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="catalog/view/theme/gd-free/stylesheet/stylesheet.css" rel="stylesheet">

<script src="catalog/view/theme/gd-free/javascript/common.js" type="text/javascript"></script>

</head>
<body>
<div class="container">

  <div class="row">
    <div id="content" class="product-detail col-sm-12">

      <ul class="nav nav-tabs">
        <li class="active"><a href="#tab-description" data-toggle="tab"><?php echo $tab_description; ?></a></li>
        <?php if ($attribute_groups) { ?>
        <li><a href="#tab-specification" data-toggle="tab"><?php echo $tab_attribute; ?></a></li>
        <?php } ?>
        <?php if ($products) { ?>
        <li><a href="#tab-products" data-toggle="tab"><?php echo $text_related; ?></a></li>
        <?php } ?>
      </ul>
      <div class="tab-content">
        <div class="tab-pane active" id="tab-description"><?php echo $description; ?></div>
        <?php if ($attribute_groups) { ?>
        <div class="tab-pane" id="tab-specification">
          <table class="table table-bordered">
            <?php foreach ($attribute_groups as $attribute_group) { ?>
            <thead>
              <tr>
                <td colspan="2"><strong><?php echo $attribute_group['name']; ?></strong></td>
              </tr>
            </thead>
            <tbody>
              <?php foreach ($attribute_group['attribute'] as $attribute) { ?>
              <tr>
                <td><?php echo $attribute['name']; ?></td>
                <td><?php echo $attribute['text']; ?></td>
              </tr>
              <?php } ?>
            </tbody>
            <?php } ?>
          </table>
        </div>
        <?php } ?>
		<?php if ($products) { ?>
		<div class="tab-pane" id="tab-products">
			<div class="row">
			<?php foreach ($products as $product) { ?>
   
        <?php $class = 'col-lg-3 col-md-3 col-sm-6 col-xs-12'; ?>

        <div class="product-layout product-grid <?php echo $class ?>">
          <div class="product-wrapper">
            <div class="product-image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" title="<?php echo $product['name']; ?>" class="img-responsive" /></a></div>
            <div class="product-info">
              <div class="product-name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
              <div class="product-description"><p><?php echo $product['description']; ?></p></div>
              <?php if ($product['price']) { ?>
              <div class="product-price">
                <span class="price-new"><?php echo $product['special'] ? $product['special'] : $product['price']; ?></span>
                <?php if ($product['special']) { ?><span class="price-old"><?php echo $product['price']; ?></span><?php } ?>

              </div>
              <?php } ?>
              <?php if ($product['rating']): ?>
              <div class="product-rating">
                <?php for ($i = 1; $i <= 5; $i++) { ?>
                <?php if ($product['rating'] < $i) { ?>
                <span class="fa fa-stack"><i class="fa fa-star off fa-stack-2x"></i></span>
                <?php } else { ?>
                <span class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i class="fa fa-star off fa-stack-2x"></i></span>
                <?php } ?>
                <?php } ?>
              </div>
              <?php endif ?>
              <div class="product-action">
                <button type="button" class="add-to-cart" onclick="cart.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-shopping-cart"></i> <span><?php echo $button_cart; ?></span></button>
                <button type="button" class="wishlist" onclick="wishlist.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-heart-o"></i> <span><?php echo $button_wishlist; ?></span></button>
                <button type="button" class="compare" onclick="compare.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-bars"></i> <span><?php echo $button_compare; ?></span></button>
              </div>
            </div>
          </div>
        </div>
        <?php } ?>
		</div>
		</div>
		<?php } ?>
		
      </div>

	  </div>
	</div>
</div>
</body>
</html>

